package cn.itsource.system.mapper;

import cn.itsource.system.domain.Role;
import cn.itsource.basic.base.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author huang
 * @since 2022-07-14
 */
public interface RoleMapper extends BaseMapper<Role> {

    void removeRoleAndMenuByRoleId(Long id);

    void removeRoleAndPermissionByRoleId(Long id);

    void insertRoleAndMenu(@Param("id") Long id,@Param("menus") List<Long> menus);

    void insertRoleAndPermission(@Param("id") Long id,@Param("permissions") List<Long> permissions);
}
